package org.csource.pool;

import org.csource.common.MyException;
import org.csource.common.NameValuePair;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: yangfei
 * Date: 2014/6/18
 * Time: 13:38
 * Desc:
 */
public interface FastDfs {

    /**
     * @desc 上传文件
     * @param filePath
     * @param fileExt
     * @param fileInfo
     * @return
     */
    public int uploadFile(String filePath, String fileExt, NameValuePair[] fileInfo) throws Exception;

    /**
     * @desc 删除文件
     * @param group_name
     * @param remoteFileName
     * @return
     */
    public int deleteFile(String group_name, String remoteFileName) throws IOException, MyException;

    /**
     * @desc 获取文件信息
     * @param group_name
     * @param remoteFileName
     * @return
     */
    public String getFile(String group_name, String remoteFileName) throws Exception;

    /**
     * @desc 下载文件
     * @param group_name
     * @param remoteFileName
     * @param localeFileName
     * @param type
     * @return
     */
    public int downFile(String group_name, String remoteFileName, String localeFileName, String type) throws IOException, MyException;

}
